using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public enum ScenesName
{
    FirstScene,
    MainMenu
}
public class ScenesManager : MonoSingleton<ScenesManager>
{
    AsyncOperation async;
    public int current;

    public override void Init()
    {
        base.Init();
        current = 0;
    }
    public void LoadScene(string sceneName)
    {
        SceneManager.LoadScene(sceneName);
    }
    public void LoadScene(ScenesName sceneName)
    {
        SceneManager.LoadScene((int)sceneName);
        current = (int)sceneName;
    }
    public void LoadScene(int sceneIndex)
    {
        SceneManager.LoadScene(sceneIndex);
        current = (int)sceneIndex;
    }
    public void LoadAsync(int sceneIndex, out AsyncOperation async)
    {
        async = SceneManager.LoadSceneAsync(sceneIndex);
        async.allowSceneActivation = false;
    }

}
